package com.design.patterns.list.responsibilitychain;

/**
 * @author Wangzhiwen
 */
public class HandlerChina extends Handler {

    private final Handler header;

    public HandlerChina() {
        ConcreteHandlerOne one = new ConcreteHandlerOne();
        ConcreteHandlerTwo two = new ConcreteHandlerTwo();
        ConcreteHandlerThree three = new ConcreteHandlerThree();
        one.setNext(two);
        two.setNext(three);
        three.setNext(one);
        this.header = one;
    }

    @Override
    protected void processRequest(Request request) {
        header.processRequest(request);
    }
}
